#include"com.hpp"
int main()
{
    int shmid = createShm();
    std::cout<<"创建成功shmid:"<<shmid<<std::endl;
    sleep(4);
    char*ch = (char*)shmat(shmid,nullptr,0);
    sleep(1);
    while(1)
    {
        sleep(1);
        printf("hello:%s\n",ch);
    }
    int n = shmdt(ch);

    shmctl(shmid,IPC_RMID,nullptr);
}